﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace Delay
{
     [Table]
    public class SoftSitting : INotifyPropertyChanged
    {
        private int _index;
        [Column(IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "INT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public int Index
        {
            get
            {
                return _index;
            }
            set
            {
                if (_index != value)
                {

                    _index = value;
                    NotifyPropertyChanged("Index");
                }

            }
        }
        private int _theme;
        [Column]
        public int Theme
        {
            get
            {
                return _theme;
            }
            set
            {
                if (_theme != value)
                {
                    _theme = value;
                    NotifyPropertyChanged("Theme");
                }
            }
        }
        private int _fontType;
        [Column]
        public int FontType
        {
            get
            {
                return _fontType;
            }
            set
            {
                if (_fontType != value)
                {
                    _fontType = value;
                    NotifyPropertyChanged("FontType");
                }
            }
        }
        private bool _isPictrue;
        [Column]
        public bool IsNonPictrueMode
        {
            get
            {
                return _isPictrue;
            }
            set
            {
                if (_isPictrue != value)
                {
                    _isPictrue = value;
                    NotifyPropertyChanged("IsNonPictrueMode");
                }
            }
        }
        private bool _isReturnClear;
        [Column]
        public bool IsReturnClear
        {
            get
            {
                return _isReturnClear;
            }
            set
            {
                if (_isReturnClear != value)
                {
                    _isReturnClear = value;
                    NotifyPropertyChanged("IsReturnClear");
                }
            }
        }
        private bool _autoLoadNextPage;
        [Column]
        public bool AutoLoadNextPage
        {
            get
            {
                return _autoLoadNextPage;
            }
            set
            {
                if (_autoLoadNextPage != value)
                {
                    _autoLoadNextPage = value;
                    NotifyPropertyChanged("AutoLoadNextPage");
                }
            }
        }
        private bool _isReturnRrompt;
        [Column]
        public bool IsReturnRrompt
        {
            get
            {
                return _isReturnRrompt;
            }
            set
            {
                if (_isReturnRrompt != value)
                {
                    _isReturnRrompt = value;
                    NotifyPropertyChanged("IsReturnRrompt");
                }
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
